<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>
<script>
  
  
    

      var array = [1,1,2,3,3,4,5,4]
    function UnLik(array) {
        for (var index = 0; index < array.length; index++) {
            for (var i = index+1; i < array.length; i++) {
                if(array[index]==array[i]){
                    array.splice(i,1);
                    i--;
                }     
            }
        }
        return array
    }
    console.log(UnLik(array));



      var ass = [1, 12, 4, 5, 6,6,4]
      var xxx=[]
      function unLick(ass){
          for (let index = 0; index < ass.length; index++) {
              if(ax.indexOf(ass[index])==-1){
                ax.push(ass[index])
              }
          }
          return xxx
      }
      console.log(unLick(acc));


      var aee = [1, 1, 2, 2, 12, 4, 5, 6, 3, 5, 2, 83, 5, 2, 2]
      function azz(aee){
         return Array.from(new Set(aee))
      }
      console.log(azz(aee));
       

     
</script>

</html>